import{
  resellRule
}from "../../../api.js"
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    resellRule(
      getApp().globalData.businessId
    ).then(res =>{
      console.log(res)
      if(res.data.code == 666){
        that.setData({
          list:res.data.data
        })
      }else{
        wx.showToast({
          title: res.data.msg,
          icon:'none'
        })
      }
    })
  },
  onShow: function () {
    getApp().startpage(new Date().getTime())
  },
  onHide: function () {
    getApp().endpage(new Date().getTime())
  },
})